<!DOCTYPE html>
<html> 
<head> 
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
	<meta name="renderer" content="webkit" />
	<title>用户登录</title> 
</head> 
<body>
	<form action="" method="post" target="_self">
	  <p>请输入您的昵称: <input type="text" name="nick" cols="20" /></p>
	  <input type="submit" value="登陆" onsubmit="check();" />
	</form>
</body> 
<script>
function check(){
	if (document.getElementByName("nick").text == ""){
		return false;
	}
	return true;
}
</script>
</html> 